﻿<Window x:Class="DataBinding.BindToFont"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="BindToFont" Height="300" Width="300"
    >
  <Window.Resources>
    <FontFamily x:Key="CustomFont">Calibri</FontFamily>
  </Window.Resources>
  
    <StackPanel Margin="10" DataContext="{x:Static SystemFonts.IconFontFamily}">
      <TextBlock Margin="5" Text="{Binding Path=Source}"></TextBlock>
      <TextBlock Margin="5" Text="{Binding Source={x:Static SystemFonts.IconFontFamily}, Path=LineSpacing}"></TextBlock>
      <TextBlock Margin="5" Text="{Binding Source={x:Static SystemFonts.IconFontFamily}, Path=FamilyTypefaces[0].Style}"></TextBlock>
      <TextBlock Margin="5" Text="{Binding Source={x:Static SystemFonts.IconFontFamily}, Path=FamilyTypefaces[0].Weight}"></TextBlock>

      <TextBlock Margin="5" Text="{Binding Source={StaticResource CustomFont}, Path=Source}"></TextBlock>
    </StackPanel>
</Window>
